#! /usr/bin/env python

# -*- coding: utf-8 -*-

import os
import sys
sys.path.append(os.path.abspath(os.path.dirname(__file__)))

import web
import application.controllers
from config import index_cache, debug_mode

urls = (
    	'/', 						'application.controllers.main.index',
		'/group',					'application.controllers.group.index',
		
		'/group/signup',			'application.controllers.group.signup',
		'/group/login',				'application.controllers.group.login',
		'/group/logout',			'application.controllers.group.logout',

		'/pre',					    'application.controllers.api.pre',
		'/login',				    'application.controllers.api.login',
		'/table',					'application.controllers.api.table',
		'/info',					'application.controllers.api.info',
		'/score',					'application.controllers.api.score',
		'/exam',					'application.controllers.api.exam',
		'/login_table',				'application.controllers.api.login_table',
		'/login_info',				'application.controllers.api.login_info',
		'/login_score',				'application.controllers.api.login_score',
		)

		
web.config.debug = debug_mode
#application = web.application(urls,globals()).wsgifunc()
if __name__ == "__main__":

	app = web.application(urls, globals(),autoreload=True)

	app.run()
